﻿
@{
		ViewBag.Title = "Orders";
		Layout = "~/Views/Shared/_Layout.cshtml";
}



<h2>Orders</h2>
<hr />



<div style="margin-bottom: 16px">
		<a href="@Url.Action("Create", "OrdersEF")" class="btn btn-primary"><span class="glyphicon glyphicon-pencil">&nbsp;</span>Create New</a>
		<div class="dropdown pull-right">
				<button class="btn btn-primary dropdown-toggle" data-toggle="dropdown" style="margin-right: 10px"><span class="glyphicon glyphicon-floppy-disk">&nbsp;</span>Export&nbsp;&nbsp;<span class="caret"></span></button>
				<ul class="dropdown-menu">
						<li><a href="">Excel (.xls)</a></li>
						<li><a href="">Word (.doc)</a></li>
						<li><a href="">CSV (.csv)</a></li>
				</ul>
				<button class="btn btn-primary pull-right" onclick="javascript: print();"><span class="glyphicon glyphicon-print"></span>&nbsp;Print</button>
		</div>
</div>




@section scripts {
		<script src="~/Scripts/Angular_Controllers/DataverseAngular.js"></script>
}




<div class="panel panel-primary" ng-app="MyApp">
	<div class="panel-heading">List of orders</div>
	<div class="panel-body" ng-controller="OrdersController">
		<table class="table table-bordered table-hover table-responsive">
			<tr>
				<th>Order Number</th>
				<th>Order Date</th>
				<th></th>
			</tr>
			<tr ng-repeat="o in orders">
					<td>{{o.Order_Date}}</td>
					<td>{{o.Customer}}</td>
					<td>
						<a href="@Url.Action("Edit", "OrdersEF")/{{o.Order_Number}}" class="btn btn-info"><span class="glyphicon glyphicon-edit">&nbsp;</span>Edit</a> |
						<a href="@Url.Action("Details", "OrdersEF")/{{o.Order_Number}}" class="btn btn-primary"><span class="glyphicon glyphicon-tags">&nbsp;</span>Details</a> |
						<a href="@Url.Action("Delete", "OrdersEF")/{{o.Order_Number}}" class="btn btn-danger"><span class="glyphicon glyphicon-trash">&nbsp;</span>Delete</a>
				</td>
			</tr>
		</table>
	</div>
</div>




@*<div ng-app="MyApp">
		<div ng-controller="OrdersController">
				<table>
						<tr ng-repeat="o in orders">
								<td>{{o.Order_Number}}</td>
								<td>{{o.Order_Date}}</td>
						</tr>
				</table>
		</div>
</div>*@
